﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CertApply
{
    public partial class frmMain : Form
    {
        private frmSelfServer _frmSelfServer;
        private frmAutomatic _frmAutomatic;
        public frmMain(frmSelfServer frmSelfServer, frmAutomatic frmAutomatic)
        {
            InitializeComponent();
            _frmSelfServer = frmSelfServer;
            _frmAutomatic = frmAutomatic;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var res = _frmSelfServer.ShowDialog();
            if (res == DialogResult.OK)
            {
                _frmSelfServer = new frmSelfServer();
            }
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            _frmAutomatic.ShowDialog();
        }
    }
}
